package com.xzq.bizimpl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.xzq.biz.AddressBiz;
import com.xzq.dao.AddressDao;
import com.xzq.entity.Address;
import com.xzq.entity.Page;
import com.xzq.entity.User;
@Service
public class AddressBizImpl implements AddressBiz {
	@Resource
	private AddressDao dao;
	@Override
	public List<Address> findOneUserAllAddress(User user) {
		List<Address> list = dao.findOneUserAllAddress(user);
		return list;
	}

	@Override
	public Page findAllAddress(Page page, User user) {
		page = dao.findAllAddress(page, user);
		return page;
	}

	@Override
	public Page findAllAddressByAdmin(Page page) {
		page = dao.findAllAddressByAdmin(page);
		return page;
	}

	@Override
	public int addAddress(Address address) {
		int count = dao.addAddress(address);
		return count;
	}

	@Override
	public int modifyAddress(Address address) {
		int count = dao.modifyAddress(address);
		return count;
	}

	@Override
	public int deleteAddress(Address address) {
		int count = dao.deleteAddress(address);
		return count;
	}

	@Override
	public Address findOneAddress(Address address) {
		address = dao.findOneAddress(address);
		return address;
	}
	
}
